/**  
* @author renbangjie renbangjie@126.com  
* @date 2014-11-5 上午11:18:26
* @version V1.0  
* <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
*/
package com.yjd.comm.user.service;

import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

import com.yjd.comm.login.dto.UserLoginDto;
import com.yjd.comm.user.model.UserModel;

/**
 * @author renbangjie renbangjie@126.com
 * @date 2014-11-5 上午11:18:26
 */
public interface IWeixinLoginService extends ILoginService {
	
	/**
	 * 获取微信的用户信息
	* @param code
	* @return UserLoginDto
	 * @throws UnsupportedEncodingException 
	 */
	public UserLoginDto getUserInfo(String code) throws UnsupportedEncodingException;
	
	/**
	 * 获取微信登录的配置信息
	* @return Map<String,String>
	 * @throws UnsupportedEncodingException 
	 */
	public Map<String, String> getWeixinLoginConfig() throws UnsupportedEncodingException;
	
	/**
	 * 绑定微信
	* @param uModel
	* @param openid
	* @param nickname
	* @return UserModel
	* @throws Exception
	 */
	public UserModel bindWeixin(String uName, String pwd, String ip, String openid, String nickname) throws Exception;
	
	
	/**
	 * 注册并登录
	* @param uName
	* @param pwd
	* @param ip
	* @param openid
	* @param nickname
	* @return
	* @throws Exception
	* UserModel
	 */
	public UserModel regLogin(String uName, String pwd, String ip, String openid, String nickname) throws Exception;
	
	
	/**
	 * 微信注册
	* @param uModel
	* @param weixin
	* @return UserModel
	 * @throws Exception 
	 */
	public UserModel weixinRegister(String uName, String pwd, Long mpNumber, String ip, String weixin) throws Exception;
	
	/**
	 * 微信推广奖励
	* @param idUser 推广员
	* @param uName 被奖励用户
	 * @throws Exception 
	 */
	public void weixinAward(List<UserModel> uModels, Double amount, Integer eventid, String demo) throws Exception;
	
	/**
	 * 
	* @author renbangjie renbangjie@126.com
	* @date 2015-2-28 下午12:34:47
	 */
	public enum RegSource{
		WEIBOHONGBAO("2015", "2015新年红包");
		private String code;
		private String label;
		private RegSource(String code, String label) {
			this.code = code;
			this.label = label;
		}
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
	}
	
}
